/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.sun.ShipperProcessor;

import com.sun.Entity.Shippingorder;
import com.sun.Facade.ShippingorderFacadeLocal;
import java.util.Calendar;
import javax.ejb.EJB;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;
import javax.ejb.Stateless;
import javax.jws.Oneway;

/**
 *
 * @author Jean-Michel
 */
@WebService()
@Stateless()
public class UpdateShippedDateWS {

    @EJB
    private ShippingorderFacadeLocal shippingorderFacade;

    /**
     * Web service operation
     */
    @WebMethod(operationName = "ShipOrder")
    @Oneway
    public void UpdateShippedDate(@WebParam(name = "OrderID") String OrderID) {
        Shippingorder Order = shippingorderFacade.find(OrderID);
        Order.setShippeddate(Calendar.getInstance().getTime());
        shippingorderFacade.edit(Order);
    }
}
